/*
 * Copyright (c) 2023 Cshoo Org. All Rights Reserved.
 */

package org.cshoo.tattoo.authorize.domain.repository;

import org.cshoo.tattoo.authorize.domain.po.RoleAuthorityRelation;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * @author 杨翼
 * @since 1.0
 */
public interface IRoleAuthorityRelationRepository extends CrudRepository<RoleAuthorityRelation, Long> {

    /**
     * 删除角色权限关系
     *
     * @param authorityId 权限id
     */
    void deleteByAuthorityId(long authorityId);

    /**
     * 删除角色权限关系
     *
     * @param authorityId 权限id
     */
    void deleteByRoleIdAndAuthorityIdIsIn(Long roleId, List<Long> authorityId);
}
